<button nz-button [nzType]="btnType" (click)="showModal()" style="margin: 1px 10px 0 0;">
    <ng-content></ng-content>
</button>
<nz-modal [(nzVisible)]="isVisible" [nzTitle]="modalTitle" [nzWidth]="1000" [nzContent]="modalContent"
    [nzFooter]="modalFooter" (nzOnCancel)="isVisible = false">
    <ng-template #modalTitle>
        <h3 style="font-size: 22px;color: #0196ff;">申请表</h3>
    </ng-template>
    <ng-template #modalContent>
        <nz-spin [nzSpinning]="submitting">
            <form nz-form>
                <div nz-row>
                    <div nz-col [nzSpan]="24">
                        <h3 class="tac h3">高速铁路临时要点维修申请表</h3>
                        <p class="tac">（昆南电&nbsp;<input style="width:110px;" nz-input [readonly]=readOnly
                                [ngModelOptions]="{standalone: true}" [(ngModel)]="no">&nbsp;号）
                        </p>
                    </div>
                </div>
                <nz-table nzBordered [nzShowPagination]="false" nzSize="small" [nzData]="[{}]">
                    <tbody>
                        <tr>
                            <td [attr.colspan]="6">路局分管副局长（总调度长）批示:</td>
                        </tr>
                        <tr>
                            <td [attr.colspan]="6">
                                <div nz-row>
                                    <div nz-col [nzSpan]="24">
                                        <p>一、维修内容:</p>
                                        <textarea nz-input rows="8" cols="6" [ngModelOptions]="{standalone: true}"
                                            [(ngModel)]="content" [readonly]=readOnly>
                                  </textarea>
                                    </div>
                                </div>
                                <div nz-row>
                                    <div nz-col [nzSpan]="24">
                                        <p>二、维修单位:</p>
                                        <textarea nz-input rows="1" cols="6" [ngModelOptions]="{standalone: true}"
                                            [(ngModel)]="workOrg" [readonly]=readOnly></textarea>
                                    </div>
                                </div>
                                <div nz-row>
                                    <div nz-col [nzSpan]="24">
                                        <p>三、配合单位:</p>
                                        <textarea nz-input rows="1" cols="6" [ngModelOptions]="{standalone: true}"
                                            [(ngModel)]="helpOrg" [readonly]=readOnly></textarea>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <nz-form-item nzFlex>
                                    <nz-form-label>申请单位</nz-form-label>
                                </nz-form-item>
                            </td>
                            <td [attr.colspan]="5">
                                <textarea nz-input cols="5" [ngModelOptions]="{standalone: true}" [(ngModel)]="applyOrg"
                                    [readonly]=readOnly></textarea>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <nz-form-item nzFlex>
                                    <nz-form-label>申请人</nz-form-label>
                                    <nz-form-control>
                                        <input nz-input [ngModelOptions]="{standalone: true}" [(ngModel)]="applyUser"
                                            [readonly]=readOnly>
                                    </nz-form-control>
                                </nz-form-item>
                            </td>
                            <td [attr.colspan]="4">
                                <nz-form-item nzFlex>
                                    <nz-form-label>手机</nz-form-label>
                                    <nz-form-control>
                                        <input nz-input [ngModelOptions]="{standalone: true}" [(ngModel)]="phone"
                                            [readonly]=readOnly>
                                    </nz-form-control>
                                </nz-form-item>
                            </td>
                            <td>
                                <nz-form-item nzFlex>
                                    <nz-form-label>审核人</nz-form-label>
                                    <nz-form-control>
                                        <input nz-input readonly>
                                    </nz-form-control>
                                </nz-form-item>
                            </td>
                        </tr>
                        <tr>
                            <td>主管业务处审核人</td>
                            <td [attr.colspan]="5"><input nz-input readonly></td>
                        </tr>
                    </tbody>
                </nz-table>
                <div nz-row [nzGutter]="24">
                    <div nz-col [nzSpan]="12">
                        <nz-form-label>申请审核单位（盖章）</nz-form-label>
                        <nz-form-control>
                            <p>&nbsp;&nbsp; 年&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp; 日</p>
                        </nz-form-control>
                    </div>
                    <div nz-col [nzSpan]="12">
                        <nz-form-label>主管业务处（盖章）</nz-form-label>
                        <nz-form-control>
                            <p>&nbsp;&nbsp; 年&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp; 日</p>
                        </nz-form-control>
                    </div>
                </div>
            </form>
        </nz-spin>
    </ng-template>
    <ng-template #modalFooter>
        <ng-container *ngIf="!!queryId">
            <button nz-button nzType="primary" (click)="readOnly=!readOnly"
                [disabled]="btnType=='primary'">{{readOnly ? '修改' : '查看'}}
            </button>
            <button nz-button nzType="primary" (click)="export(apiIdentity)">导出</button>
        </ng-container>
        <button nz-button nzType="primary" (click)="submitForm()" [disabled]="readOnly">提交</button>
    </ng-template>
</nz-modal>